package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.MemberSetmeal;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SetmealDao {
    void add(Setmeal setmeal);

    void delete(Integer id);

    void deleteAssociation(Integer id);

    void edit(Setmeal setmeal);

    List<Setmeal> findAll();

    Setmeal findById(int id);

    List<Integer> findCheckgroupIdsBySetmealId(Integer setmealId);

    List<Map<String,Object>> findSetmealCount();

    Page<Setmeal> selectByCondition(String queryString);

    void setSetmealAndCheckGroup(Map<String, Integer> map);

    /**
     * 根据member会员id查询其预约的所有套餐信息,以及预约详情
     * 返回查询的预约及套餐信息
     */
    //List<Map<String,Object>> getOrderSetmealByMemberId(@Param("memberId") Integer id,@Param("orderId")Integer orderId,@Param("map") Map map);
    List<Map<String,Object>> getOrderSetmealByMemberId( Map map);
    List<MemberSetmeal> getAllSetmealByphoneNumber(String phoneNumber);

    MemberSetmeal findResultByOrderDate(Date orderDate);
}
